package com.itheima;

import org.junit.jupiter.api.Test;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class PublisherTestFanout {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    @Test
    public void testFanoutQueue(){
        String queueName="fanout.queue2";
        String message="hello,大傻逼张亮也haha！";
        rabbitTemplate.convertAndSend(queueName,message);
    }
}
